<?php echo $__env->make("template::My.views.header", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>  
<link href="/mycms/cms/theme/My/assets/css/login.css?time=<?php echo e(time()); ?>" rel="stylesheet">
</head>
<body class="bg-[#FFFFFF] font-['PingFang']">
        <p class="text-center pt-[82px] text-[#222222] font-extrabold   font-['PingFang'] text-[23px]">设置密码</p>
   <form method="post" id="pwd"  onsubmit="return register();">
    <div class="container mx-auto bg-white w-11/12  rounded-3xl  flex flex-row justify-center items-center  mb-[57px] mt-[52px]">
        <input type="password"  id='password' name="password" class="rounded-full w-[302px]   h-[53px]   bg-[#F6F6F6] text-center text-[#C6C6C6] text-xl  border-[0px] placeholder:text-[#C6C6C6] placeholder:text-[18px] focus:text-[#222222]  focus:text-[18px] " placeholder="8-16位 包含数组字母"/>       
    </div>
     <?php echo csrf_field(); ?>
      <input type="hidden" name="id" value="<?php echo e($id); ?>"/>
    <div class="container mx-auto flex flex-col justify-center items-center">
        <button  class="bg-[#3368FD] rounded-full shadow-xl shadow-blue-400/30 w-[302px]  h-[50px]  mb-[268px] text-white font-bold text-[18px]">完成</button>
    </div> 
    </form>
<script>
   
    function register()
    {
       
        var password=$('#password').val(); 
        $.ajax({
            url: '<?php echo e(route('user.done')); ?>',
            type: 'post',
            contentType: "application/x-www-form-urlencoded; charset=UTF-8",
            dataType: "json",
            data: $('#pwd').serialize(),
            timeout: 60000,
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            },
            success: function (res) {
                alert(res.msg);
                location.href = "<?php echo e($referrer?:url('/')); ?>";  
            },
            error: function (xhr) {
                jsonObj=JSON.parse(xhr.response)
               alert(jsonObj.msg);
                return false;
            }
        });
        return false;
    }

</script>
<?php echo $__env->make("template::My.views._footer", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php /**PATH /www/wwwroot/mycms/Template/My/views/setpw.blade.php ENDPATH**/ ?>